package com.pactera.madp.cp.common.constant;

import com.pactera.madp.cp.api.em.beta.ChoreographyEnum;

import java.util.Arrays;
import java.util.List;

/**
 * @author Deming.Chang
 * @title beta资讯常量定义
 * @date 2022-06-13
 */
public interface BetaConstants {
    /**
     * 响应正常数据关键字
     */
    String DATA_KEY = "Data";
    /**
     * 响应业务主键关键字
     */
    String NEWS_KEY = "newsKey";
    /**
     * 响应错误数据关键字
     */
    String ERROR_KEY = "X-Ca-Error-Message";
    /**
     * 资讯类别查询参数关键字
     */
    String REQUEST_PARAM_KEY = "type";
    /**
     * 精编资讯信息列表请求路径
     */
    String GET_CHOREOGRAPHY_INFORMATION_LIST_PATH = "/API/Morning/GetChoreographyInformationList";
    /**
     * 原创资讯信息请求路径
     */
    String GET_ORIGINAL_INFORMATION_PATH = "/API/Morning/GetOriginalInformation";
    /**
     * URL正则表达式(@TODO：正则表达式可能不对)
     * "((https?|ftp|gopher|telnet|file):((//)|(\\\\))+[\\w\\d:#@%/;$()~_?\\+-=\\\\.&]*)"
     */
    String URL_REGEX = "(https?:((//)|(\\\\))+[\\w\\d:#@%/;$()~_?\\+-=\\\\.&]*)";
    /**
     * 请求头[CONTENT_DISPOSITION]值前缀
     */
    String CONTENT_DISPOSITION_PREFIX = "filename=";
    /**
     * 精编系列类型列表定义
     */
    List<Integer> CHOREOGRAPHY_TYPE_LIST = Arrays.asList(
            ChoreographyEnum.FUND.getType(),
            ChoreographyEnum.INSURANCE.getType(),
            ChoreographyEnum.PROPERTY.getType(),
            ChoreographyEnum.FINANCIAL.getType(),
            ChoreographyEnum.MACRO.getType(),
            ChoreographyEnum.INTERNATIONAL.getType(),
            ChoreographyEnum.SECURITIES.getType(),
            ChoreographyEnum.PRIVATE.getType(),
            ChoreographyEnum.FAMILY.getType(),
            ChoreographyEnum.TAX_SMALL.getType()
    );
}
